Parameters for all device types Log parameters Vital product data parameters
SCSI-2

8.3.3 Mode parameters

This subclause describes the block descriptors and the pages used with MODE SELECT and MODE SENSE commands that are applicable to all SCSI devices. Pages specific to each device type are described in the third subclause of each device-type clause (i.e. 9.3, 10.3, etc.).

The mode parameter list shown in table 90 contains a header, followed by zero or more block descriptors, followed by zero or more variable-length pages. Parameter lists are defined for each device type.

Table 90 - Mode parameter list

================================================================================
|   Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    |
|Byte  |        |        |        |        |        |        |        |        |
|==============================================================================|
|0 - n |                        Mode parameter header                          |
|==============================================================================|
|0 - n |                        Block descriptor(s)                            |
|==============================================================================|
|0 - n |                        Page(s)                                        |
================================================================================
The six-byte command descriptor block parameter header is defined in table 91.

Table 91 - Mode parameter header(6)

===============================================================================
|  Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    |
|Byte |        |        |        |        |        |        |        |        |
|=============================================================================|
| 0   |                           Mode data length                            |
|-----------------------------------------------------------------------------|
| 1   |                           Medium type                                 |
|-----------------------------------------------------------------------------|
| 2   |                           Device-specific parameter                   |
|-----------------------------------------------------------------------------|
| 3   |                           Block descriptor length                     |
===============================================================================
The ten-byte command descriptor block parameter header is defined in table 92.

Table 92 - Mode parameter header(10)

===============================================================================
|  Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    |
|Byte |        |        |        |        |        |        |        |        |
|=============================================================================|
| 0   | (MSB)                                                                 |
|---------                        Mode data length                         ---|
| 1   |                                                                 (LSB) |
|-----------------------------------------------------------------------------|
| 2   |                           Medium type                                 |
|-----------------------------------------------------------------------------|
| 3   |                           Device-specific parameter                   |
|-----------------------------------------------------------------------------|
| 4   |                           Reserved                                    |
|-----------------------------------------------------------------------------|
| 5   |                           Reserved                                    |
|-----------------------------------------------------------------------------|
| 6   | (MSB)                                                                 |
|---------                        Block descriptor length                  ---|
| 7   |                                                                 (LSB) |
===============================================================================
When using the MODE SENSE command, the mode data length field specifies the length in bytes of the following data that is available to be transferred. The mode data length does not include itself. When using the MODE SELECT command, this field is reserved.

( Targets that support more than 256 bytes of block descriptors and pages may need to implement ten-byte mode commands. The mode data length field in the six-byte command descriptor block header limits the returned data to 256 bytes. )

Medium types are unique for each device type. Refer to the mode parameters clause of the specific device type for definition of these values. Some device types reserve this field.

The device specific parameter is unique for each device type. Refer to the mode parameters clause of the specific device type for definition of this field. Some device types reserve all or part of this field.

The block descriptor length specifies the length in bytes of all the block descriptors. It is equal to the number of block descriptors times eight, and does not include pages or vendor-specific parameters, if any, that may follow the last block descriptor. A block descriptor length of zero indicates that no block descriptors are included in the mode parameter list. This condition shall not be considered an error.

The mode parameter block descriptor is shown in table 93.

Table 93 - Mode parameter block descriptor

===============================================================================
|  Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    |
|Byte |        |        |        |        |        |        |        |        |
|=============================================================================|
| 0   |                           Density code                                |
|-----------------------------------------------------------------------------|
| 1   | (MSB)                                                                 |
|---------                                                                 ---|
| 2   |                           Number of blocks                            |
|---------                                                                 ---|
| 3   |                                                                 (LSB) |
|-----------------------------------------------------------------------------|
| 4   |                           Reserved                                    |
|-----------------------------------------------------------------------------|
| 5   | (MSB)                                                                 |
|---------                                                                 ---|
| 6   |                           Block length                                |
|---------                                                                 ---|
| 7   |                                                                 (LSB) |
===============================================================================
Block descriptors specify some of the medium characteristics for all or part of a logical unit. Support for block descriptors is optional. Each block descriptor contains a density code field, a number of blocks field, and a block length field. Block descriptor values are always current (i.e. saving is not supported). A unit attention condition (see 7.9) shall be generated when any block descriptor values are changed.

The density code field is unique for each device type. Refer to the mode parameters clause of the specific device type for definition of this field. Some device types reserve all or part of this field.

The number of blocks field specifies the number of logical blocks on the medium to which the density code and block length fields apply. A value of zero indicates that all of the remaining logical blocks of the logical unit shall have the medium characteristics specified.

( There may be implicit association between parameters defined in the pages and block descriptors. For direct-access devices, the block length affects the optimum values (the values that achieve best performance) for the sectors per track, bytes per physical sector, track skew factor, and cylinder skew factor fields in the format parameters page. In this case, the target may change parameters not explicitly sent with the MODE SELECT command. A subsequent MODE SENSE command would reflect these changes. ) ( The number of remaining logical blocks may be unknown for some device types. )

The block length specifies the length in bytes of each logical block described by the block descriptor. For sequential-access devices, a block length of zero indicates that the logical block size written to the medium is specified by the transfer length field in the command descriptor block (see 10.2.4 and 10.2.14)

The mode page format is defined in table 94.

Table 94 - Mode page format

===============================================================================
|  Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    |
|Byte |        |        |        |        |        |        |        |        |
|=============================================================================|
| 0   |   PS   |Reserved|         Page code                                   |
|-----------------------------------------------------------------------------|
| 1   |                           Page length (n-1))                          |
|-----------------------------------------------------------------------------|
| 2   |                                                                       |
|--------                         Mode parameters                          ---|
| n   |                                                                       |
===============================================================================
Each mode page contains a page code, a page length, and a set of mode parameters. The page codes are defined in this subclause and in the mode parameter sub-clauses of the specific device type.

When using the MODE SENSE command, a parameters savable (PS) bit of one indicates that the mode page can be saved by the target in a non-volatile, vendor-specific location. A PS bit of zero indicates that the supported parameters cannot be saved. When using the MODE SELECT command, the PS bit is reserved.

The page code field identifies the format and parameters defined for that mode page. Some page codes are defined as applying to all device types and other page codes are defined for the specific device type.

When using the MODE SENSE command, if page code 00h (vendor-specific page) is implemented, the target shall return that page last in response to a request to return all pages (page code 3Fh). When using the MODE SELECT command, this page should be sent last.

The page length field specifies the length in bytes of the mode parameters that follow. If the initiator does not set this value to the value that is returned for the page by the MODE SENSE command, the target shall terminate the command with CHECK CONDITION status. The sense key shall be set to ILLEGAL REQUEST with the additional sense code set to INVALID FIELD IN PARAMETER LIST. The target is permitted to implement a mode page that is less than the full page length defined in this International Standard, provided no field is truncated and the page length field correctly specifies the actual length implemented.

The mode parameters for each page are defined in the following subclauses, or in the mode parameters sub-clause for the specific device type. Mode parameters not implemented by the target shall be set to zero.

Table 95 defines the mode pages that are applicable to all device types that include the MODE SELECT and MODE SENSE commands.

Table 95 - Mode page codes

===============================================================================
|  Page code  |  Description                                     | Subclause  |
|-----------------------------------------------------------------------------|
|     0Ah     |  Control mode page                               |  8.3.3.1   |
|     02h     |  Disconnect-reconnect page                       |  8.3.3.2   |
|     09h     |  Peripheral device page                          |  8.3.3.3   |
|     01h     |  (See specific device type)                      |            |
|  03h - 08h  |  (See specific device type)                      |            |
|  0Bh - 1Fh  |  (See specific device type)                      |            |
|     00h     |  Vendor-specific (does not require page format)  |            |
|  20h - 3Eh  |  Vendor-specific (page format required)          |            |
|     3Fh     |  Return all pages                                |            |
|             |     (valid only for the MODE SENSE command)      |            |
===============================================================================
8.3.3.1 Control mode page

The control mode page (see table 96) provides controls over several SCSI-2 features that are applicable to all device types such as tagged queuing, extended contingent allegiance, asynchronous event notification, and error logging.

Table 96 - Control mode page

===============================================================================
|  Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    |
|Byte |        |        |        |        |        |        |        |        |
|=============================================================================|
| 0   |   PS   |Reserved|         Page code (0Ah)                             |
|-----------------------------------------------------------------------------|
| 1   |                           Page length (06h)                           |
|-----------------------------------------------------------------------------|
| 2   |                           Reserved                           |  RLEC  |
|-----------------------------------------------------------------------------|
| 3   |     Queue algorithm modifier      |    Reserved     |  QErr  |  DQue  |
|-----------------------------------------------------------------------------|
| 4   |  EECA  |              Reserved             | RAENP  | UAAENP | EAENP  |
|-----------------------------------------------------------------------------|
| 5   |                           Reserved                                    |
|-----------------------------------------------------------------------------|
| 6   | (MSB)                                                                 |
|---------                        Ready AEN holdoff period                 ---|
| 7   |                                                                 (LSB) |
===============================================================================
A report log exception condition (RLEC) bit of one specifies that the target shall report log exception conditions as described in 8.3.2. A RLEC bit of zero specifies that the target shall not report log exception conditions.

The queue algorithm modifier field (see table 97) specifies restrictions on the algorithm used for reordering commands that are tagged with the SIMPLE QUEUE TAG message.

Table 97 - Queue algorithm modifier

==================================================
|   Value   |  Definition                        |
|------------------------------------------------|
|     0h    |  Restricted reordering             |
|     1h    |  Unrestricted reordering allowed   |
|  2h - 7h  |  Reserved                          |
|  8h - Fh  |  Vendor-specific                   |
==================================================
A value of zero in this field specifies that the target shall order the actual execution sequence of the commands with a SIMPLE QUEUE tag such that data integrity is maintained for that initiator. This means that, if the transmission of new commands is halted at any time, the final value of all data observable on the medium shall have exactly the same value as it would have if the commands had been executed in the same received sequence without tagged queuing. The restricted reordering value shall be the default value.

A value of one in this field specifies that the target may reorder the actual execution sequence of the commands with a SIMPLE QUEUE tag in any manner. Any data integrity exposures related to command sequence order are explicitly handled by the initiator through the selection of appropriate commands and queue tag messages.

A queue error management (QErr) bit of zero specifies that remaining suspended I/O process shall resume after the contingent allegiance condition or extended contingent allegiance condition (see 7.8).

A QErr bit of one specifies all remaining suspended I/O processes shall be aborted after the contingent allegiance condition or extended contingent allegiance condition (see 7.8). A unit attention condition (see 7.9) shall be generated for each initiator that had a suspended I/O process aborted except for the initiator that had the contingent allegiance condition or extended contingent allegiance condition. The target shall set the additional sense code to TAGGED COMMANDS CLEARED BY ANOTHER INITIATOR.

A disable queuing (DQue) bit of zero specifies that tagged queuing shall be enabled if the target supports tagged queuing. A DQue bit of one specifies that tagged queuing shall be disabled. Any queued commands for that I_T_x nexus shall be aborted. Any subsequent queue tag message received shall be rejected with a MESSAGE REJECT message and the I/O process shall be executed as an untagged command (see 7.8.1).

An enable extended contingent allegiance (EECA) bit of one specifies that extended contingent allegiance is enabled (see 7.7). An EECA bit of zero specifies that extended contingent allegiance is disabled.

The RAENP, UAAENP, and EAENP bits enable specific events to be reported via the asynchronous event notification protocol. When all three bits are zero, the target shall not create asynchronous event notifications.

A ready AEN permission (RAENP) bit of one specifies that the target may issue an asynchronous event notification upon completing its initialization sequence instead of generating a unit attention condition. A RAENP bit of zero specifies that the target shall not issue an asynchronous event notification upon completing its initialization sequence.

( If the target's default value for the RAENP bit is one and it does not implement saved parameters or include a hardware switch, then it may not be possible to disable the initialization sequence asynchronous event notification. )

A unit attention AEN permission (UAAENP) bit of one specifies that the target may issue an asynchronous event notification instead of creating a unit attention condition upon detecting an event that would cause a unit attention condition (other than upon completing an initialization sequence). A UAAENP bit of zero specifies that the target shall not issue an asynchronous event notification instead of creating a unit attention condition.

An error AEN permission (EAENP) bit of one specifies that the target may issue an asynchronous event notification upon detecting a deferred error condition instead of waiting to report the deferred error on the next command. An EAENP bit of zero specifies that the target shall not report deferred error conditions via an asynchronous event notification.

The ready AEN holdoff period field specifies the minimum time in milliseconds after the target starts its initialization sequence that it shall delay before attempting to issue an asynchronous event notification. This value may be rounded up as defined in 7.5.4.

8.3.3.2 Disconnect-reconnect page

The disconnect-reconnect page (see table 98) provides the initiator the means to tune the performance of the SCSI bus.

Table 98 - Disconnect-reconnect page

===============================================================================
|  Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    |
|Byte |        |        |        |        |        |        |        |        |
|=============================================================================|
| 0   |   PS   |Reserved|         Page code (02h)                             |
|-----------------------------------------------------------------------------|
| 1   |                           Page length (0Eh)                           |
|-----------------------------------------------------------------------------|
| 2   |                           Buffer full ratio                           |
|-----------------------------------------------------------------------------|
| 3   |                           Buffer empty ratio                          |
|-----------------------------------------------------------------------------|
| 4   | (MSB)                                                                 |
|---------                        Bus inactivity limit                     ---|
| 5   |                                                                 (LSB) |
|-----------------------------------------------------------------------------|
| 6   | (MSB)                                                                 |
|---------                        Disconnect time limit                    ---|
| 7   |                                                                 (LSB) |
|-----------------------------------------------------------------------------|
| 8   | (MSB)                                                                 |
|---------                        Connect time limit                       ---|
| 9   |                                                                 (LSB) |
|-----------------------------------------------------------------------------|
| 10  | (MSB)                                                                 |
|---------                        Maximum burst size                       ---|
| 11  |                                                                 (LSB) |
|-----------------------------------------------------------------------------|
| 12  |                           Reserved                  |      DTDC       |
|-----------------------------------------------------------------------------|
| 13  |                           Reserved                                    |
|-----------------------------------------------------------------------------|
| 14  |                           Reserved                                    |
|-----------------------------------------------------------------------------|
| 15  |                           Reserved                                    |
===============================================================================
The buffer full ratio field indicates to the target, on read operations, how full the buffer should be prior to attempting a reselection. Targets that do not implement the requested ratio should round down to the nearest implemented ratio as defined in 7.5.4.

The buffer empty ratio field indicates to the target, on write operations, how empty the buffer should be prior to attempting a reselection. Targets that do not implement the requested ratio should round down to the nearest implemented ratio as defined in 7.5.4.

The buffer full and buffer empty ratios are numerators of a fractional multiplier that has 256 as its denominator. A value of zero indicates that the target determines when to initiate reselection consistent with the disconnect time limit parameter. These parameters are advisory to the target.

( As an example, consider a target with ten 512-byte buffers and a specified buffer full ratio of 3Fh. The formula is: INTEGER((ratio/256)*number of buffers). Thus INTEGER((3Fh/256)*10) = 2. The target should attempt to reselect the initiator on read operations whenever two or more buffers are full. )

The bus inactivity limit field indicates the maximum time in 100 ms increments that the target is permitted to assert the BSY signal without a REQ/ACK handshake. If the bus inactivity limit is exceeded the target shall attempt to disconnect if the initiator has granted the disconnect privilege (see 6.6.7) and it is not restricted by DTDC. This value may be rounded as defined in 7.5.4. A value of zero indicates that there is no bus inactivity limit.

The disconnect time limit field indicates the minimum time in 100 ms increments that the target shall wait after releasing the SCSI bus before attempting reselection. This value may be rounded as defined in 7.5.4. A value of zero indicates that there is no disconnect time limit.

The connect time limit field indicates the maximum time in 100 ms increments that the target is allowed to use the SCSI bus before disconnecting, if the initiator has granted the disconnect privilege (see 6.6.7) and it is not restricted by DTDC. This value may be rounded as defined in 7.5.4. A value of zero indicates that there is no connect time limit.

The maximum burst size field indicates the maximum amount of data that the target shall transfer during a data phase before disconnecting if the initiator has granted the disconnect privilege. This value is expressed in increments of 512 bytes (e.g. a value of one means 512 bytes, two means 1024 bytes, etc.). A value of zero indicates there is no limit on the amount of data transferred per connection.

The data transfer disconnect control (DTDC) field (see table 99) defines further restrictions on when a disconnect is permitted.

Table 99 - Data transfer disconnect control

===============================================================================
| DTDC  |  Description                                                        |
|-----------------------------------------------------------------------------|
|  00b  |  Data transfer disconnect control is not used.  Disconnect is       |
|       |  controlled by the other fields in this page.                       |
|  01b  |  A target shall not attempt to disconnect once the data transfer of |
|       |  a command has started until all data the command is to transfer has|
|       |  been transferred.  The connect time limit and bus inactivity limit |
|       |  are ignored during the data transfer.                              |
|  10b  |  Reserved                                                           |
|  11b  |  A target shall not attempt to disconnect once the data transfer of |
|       |  a command has started, until the command is complete.  The connect |
|       |  time limit and bus inactivity limit are ignored once data transfer |
|       |  has started.                                                       |
===============================================================================
If DTDC is non-zero and the maximum burst size is non-zero, the target shall return CHECK CONDITION status. The sense key shall be set to ILLEGAL REQUEST and the additional sense code set to ILLEGAL FIELD IN PARAMETER LIST.

8.3.3.3 Peripheral device page

The peripheral device page (see table 100) is used to pass vendor-specific information between an initiator and a peripheral interface below the target (i.e. between the target and the peripheral device). This International Standard does not define the format of this data, except to provide a standard header.

Table 100 - Peripheral device page

===============================================================================
|  Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    |
|Byte |        |        |        |        |        |        |        |        |
|=============================================================================|
| 0   |   PS   |Reserved|         Page code (09h)                             |
|-----------------------------------------------------------------------------|
| 1   |                           Page length (n-1)                           |
|-----------------------------------------------------------------------------|
| 2   | (MSB)                                                                 |
|---------                        Interface identifier                     ---|
| 3   |                                                                 (LSB) |
|-----------------------------------------------------------------------------|
| 4   |                           Reserved                                    |
|-----------------------------------------------------------------------------|
| 5   |                           Reserved                                    |
|-----------------------------------------------------------------------------|
| 6   |                           Reserved                                    |
|-----------------------------------------------------------------------------|
| 7   |                           Reserved                                    |
|-----------------------------------------------------------------------------|
| 8   |                                                                       |
|---------                        Vendor-specific                          ---|
| n   |                                                                       |
===============================================================================
Interface identifier codes are defined in the table 101.

Table 101 - Interface identifier codes

===============================================================================
|                 |                                      |       ANSI         |
|   Code value    |               Interface              | Reference standard |
|-----------------------------------------------------------------------------|
|      0000h      |  Small computer cystem interface     |  X3.131-1986       |
|      0001h      |  Storage module interface            |  X3.91M-1990       |
|      0002h      |  Enhanced small device interface     |  X3.170A-1991      |
|      0003h      |  Intelligent peripheral interface-2  |  X3.130-1986;      |
|                 |                                      |    X3T9.3/87-002   |
|      0004h      |  Intelligent peripheral interface-3  |  X3.132-1987;      |
|                 |                                      |    X3.147-1988     |
|  0005h - 7FFFh  |  Reserved                            |                    |
|  8000h - FFFFh  |  Vendor-specific                     |                    |
===============================================================================